<html>
	<head>
		<title>Carnegie FS | Research</title>
		#{include 'html_head.html'/}
		<script type="text/javascript">
		$(document).ready(function(){
			var params = "APPL|GOOG";
			var data2;
			var chart;
			$.ajax({
				type: "POST",
				url: "/customer/getResearchData?params=" + params,
				dataType: "json",
				success: function(data){
					chart = new Highcharts.StockChart({
						chart : {
							renderTo : 'stock_graph'
						},
						rangeSelector : {
							selected : 1
						},
						title : {
							text : 'APPL vs GOOG'
						},							
						series : [{
							name : 'APPL',
							data : data,
							tooltip: { yDecimals: 2	}
						}]						
					});
				},
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					alert(textStatus);
				}
			});

			$("#btn").click(function(){
				chart.addSeries({
					name : 'GOOG', 
					data : [[Date.UTC(2011,0,1),10],[Date.UTC(2011,0,2),2]],
					tooltip: { yDecimals: 2	}
				});			
			});			
			
		});
		</script>
	</head>	
	<body>
		<script type="text/javascript" src="/public/js/highstock.js"></script>
		<script type="text/javascript" src="/public/js/modules/exporting.js"></script>		

		<div id="stock_graph"></div>
		
		<button id="btn">button</button>
	</body>
</html>
	